import { request} from '@/utils/request.util';
import type {Response}from '@/types/common';
import type {Root,DeptResponse,FeeResponse} from '@/types/root'
import type { LoginResponse } from '@/types/login'

// const account = await request.get<Response<Root>>("/login/account");
//登录

export const loginAccount =  (body:Root) => request.post<LoginResponse> ("/login/account", body);  

//科室下拉数据
export const deptGetSelectList = ()=> request.get<DeptResponse>("/clinic/dept/getSelectList");

//员工下拉数据
export const feeGetSelectList = ()=> request.get<FeeResponse>("/project/fee/getSelectList");

//文件BASE64上传
export interface Base64UploadData {
     code: string;
     msg: string;
     timestamp: number;
     data: string;
     ok: boolean;
};
export const base64Upload =  (body:{
  baseStr: string,
  isCompress: any
}) => request.post<Base64UploadData> ("/file/base64/upload", body);  


//获取菜单列表
export const getMenuList = ()=> request.get<any>("/clinic/auth/getMenuList");

// 获取验证码
export const getCaptcha = ()=> request.post<any>("/login/captchaImage");


//厂家下拉
export const getMfrSelectList = ()=> request.get<any>("/stock/supply/getMfrSelectList");

//供应商下拉

export const getSupplierSelectList = ()=> request.get<any>("/stock/supply/getSupplySelectList");